package com.uphone.magicleafteacher.pro.adapter;

import android.support.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.uphone.magicleafteacher.R;
import com.uphone.magicleafteacher.util.CommonUtil;
import com.uphone.magicleafteacher.view.MyBaseViewHolder;
import com.uphone.magicleafteacher.vo.AdviserBean;

public class AdviserAdapter extends BaseQuickAdapter<AdviserBean.StuAppointmentsBean, MyBaseViewHolder> {


    public AdviserAdapter() {
        super(R.layout.layout_itemadviser);
    }

    @Override
    protected void convert(@NonNull MyBaseViewHolder helper, AdviserBean.StuAppointmentsBean item) {
//        测试状态:0:没有测试, 1: 已经测试, 2: 测试取消
        helper.setImageView(mContext, R.id.iv_statue, item.getTestStatus() == 0 ? R.mipmap.weitest : item.getTestStatus() == 1 ? R.mipmap.yitest : R.mipmap.yiquxiao)
                .setText(R.id.text_student_name, CommonUtil.getStr(item.getStudentName()))
                .setText(R.id.text_ordertime, CommonUtil.getStr(item.getAppointDate()))
                .setText(R.id.text_address, CommonUtil.getStr(item.getAddress()));
    }
}
